<% if image %> 
  <%= image_tag image.attachment.url(:product) %>
<% else %>
  <%= product_image(@product) %>
<% end %>